# coding: utf-8

"""
SeriesApi.py
Copyright 2015 SmartBear Software

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
"""

from __future__ import absolute_import, unicode_literals

from six import iteritems

from ..api_client import ApiClient
from ..configuration import Configuration


class SeriesApi(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        config = Configuration()
        if api_client:
            self.api_client = api_client
        else:
            if not config.api_client:
                config.api_client = ApiClient()
            self.api_client = config.api_client

    def series_id_get(self, id, **kwargs):
        """
        Returns a series records that contains all information known about a particular series id.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :param str accept_language: Records are returned with the Episode name and Overview in the desired language,
                                    if it exists. If there is no translation for the given language, then the record
                                    is still returned but with empty values for the translated fields.
        :return: Series
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'accept_language', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_get`")

        resource_path = '/series/{id}'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}
        if 'accept_language' in params:
            header_params['Accept-Language'] = params['accept_language']

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='SeriesData',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_head(self, id, **kwargs):
        """
        Returns header information only about the given series ID.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_head(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :param str accept_language: Records are returned with the Episode name and Overview in the desired language,
                                    if it exists. If there is no translation for the given language, then the record
                                    is still returned but with empty values for the translated fields.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'accept_language', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_head" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_head`")

        resource_path = '/series/{id}'
        method = 'HEAD'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}
        if 'accept_language' in params:
            header_params['Accept-Language'] = params['accept_language']

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type=None,
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_actors_get(self, id, **kwargs):
        """
        Returns actors for the given series id

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_actors_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :return: SeriesActors
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_actors_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_actors_get`")

        resource_path = '/series/{id}/actors'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='SeriesActors',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_episodes_get(self, id, **kwargs):
        """

        All episodes for a given series. Paginated with 100 results per page.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_episodes_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :param str page: Page of results to fetch. Defaults to page 1 if not provided.
        :return: SeriesEpisodes
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'page', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_episodes_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_episodes_get`")

        resource_path = '/series/{id}/episodes'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'page' in params:
            query_params['page'] = params['page']

        header_params = {}

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='SeriesEpisodes',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_episodes_query_get(self, id, **kwargs):
        """
        This route allows the user to query against episodes for the given series.
        The response is a paginated array of episode records that have been filtered down to basic information.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_episodes_query_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :param str absolute_number: Absolute number of the episode
        :param str aired_season: Aired season number
        :param str aired_episode: Aired episode number
        :param str dvd_season: DVD season number
        :param str dvd_episode: DVD episode number
        :param str imdb_id: IMDB id of the episode
        :param str page: Page of results to fetch. Defaults to page 1 if not provided.
        :param str accept_language: Records are returned with the Episode name and Overview in the desired language,
                                    if it exists. If there is no translation for the given language, then the record
                                    is still returned but with empty values for the translated fields.
        :return: SeriesEpisodesQuery
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'absolute_number', 'aired_season', 'aired_episode', 'dvd_season',
                      'dvd_episode', 'imdb_id', 'page', 'accept_language', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_episodes_query_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_episodes_query_get`")

        resource_path = '/series/{id}/episodes/query'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'absolute_number' in params:
            query_params['absoluteNumber'] = params['absolute_number']
        if 'aired_season' in params:
            query_params['airedSeason'] = params['aired_season']
        if 'aired_episode' in params:
            query_params['airedEpisode'] = params['aired_episode']
        if 'dvd_season' in params:
            query_params['dvdSeason'] = params['dvd_season']
        if 'dvd_episode' in params:
            query_params['dvdEpisode'] = params['dvd_episode']
        if 'imdb_id' in params:
            query_params['imdbId'] = params['imdb_id']
        if 'page' in params:
            query_params['page'] = params['page']

        header_params = {}
        if 'accept_language' in params:
            header_params['Accept-Language'] = params['accept_language']

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='SeriesEpisodesQuery',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_episodes_query_params_get(self, id, **kwargs):
        """
        Returns the allowed query keys for the `/series/{id}/episodes/query` route

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_episodes_query_params_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :return: SeriesEpisodesQueryParams
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_episodes_query_params_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_episodes_query_params_get`")

        resource_path = '/series/{id}/episodes/query/params'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='SeriesEpisodesQueryParams',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_episodes_summary_get(self, id, **kwargs):
        """
        Returns a summary of the episodes and seasons available for the series.

        Note: Season "0" is for all episodes that are considered to be specials.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_episodes_summary_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :return: SeriesEpisodesSummary
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_episodes_summary_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_episodes_summary_get`")

        resource_path = '/series/{id}/episodes/summary'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='SeriesEpisodesSummary',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_filter_get(self, id, keys, **kwargs):
        """

        Returns a series records, filtered by the supplied comma-separated list of keys.
        Query keys can be found at the `/series/{id}/filter/params` route.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_filter_get(id, keys, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :param str keys: Comma-separated list of keys to filter by (required)
        :param str accept_language: Records are returned with the Episode name and Overview in the desired language,
                                    if it exists. If there is no translation for the given language, then the record
                                    is still returned but with empty values for the translated fields.
        :return: Series
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'keys', 'accept_language', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_filter_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_filter_get`")
        # verify the required parameter 'keys' is set
        if ('keys' not in params) or (params['keys'] is None):
            raise ValueError("Missing the required parameter `keys` when calling `series_id_filter_get`")

        resource_path = '/series/{id}/filter'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'keys' in params:
            query_params['keys'] = params['keys']

        header_params = {}
        if 'accept_language' in params:
            header_params['Accept-Language'] = params['accept_language']

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='Series',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_filter_params_get(self, id, **kwargs):
        """

        Returns the list of keys available for the `/series/{id}/filter` route

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_filter_params_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :param str accept_language: Records are returned with the Episode name and Overview in the desired language,
                                    if it exists. If there is no translation for the given language, then the record
                                    is still returned but with empty values for the translated fields.
        :return: FilterKeys
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'accept_language', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_filter_params_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_filter_params_get`")

        resource_path = '/series/{id}/filter/params'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}
        if 'accept_language' in params:
            header_params['Accept-Language'] = params['accept_language']

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='FilterKeys',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_images_get(self, id, **kwargs):
        """

        Returns a summary of the images for a particular series

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_images_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :param str accept_language: Records are returned with the Episode name and Overview in the desired language,
                                    if it exists. If there is no translation for the given language, then the record
                                    is still returned but with empty values for the translated fields.
        :return: SeriesImagesCounts
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'accept_language', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_images_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_images_get`")

        resource_path = '/series/{id}/images'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}
        if 'accept_language' in params:
            header_params['Accept-Language'] = params['accept_language']

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='SeriesImagesCounts',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_images_query_get(self, id, **kwargs):
        """

        Query images for the given series ID.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_images_query_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :param str key_type: Type of image you're querying for
                             (fanart, poster, etc. See ../images/query/params for more details).
        :param str resolution: Resolution to filter by (1280x1024, for example)
        :param str sub_key: Subkey for the above query keys. See /series/{id}/images/query/params for more information
        :param str accept_language: Records are returned with the Episode name and Overview in the desired language,
                                    if it exists. If there is no translation for the given language, then the record
                                    is still returned but with empty values for the translated fields.
        :return: SeriesImageQueryResults
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'key_type', 'resolution', 'sub_key', 'accept_language', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_images_query_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_images_query_get`")

        resource_path = '/series/{id}/images/query'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}
        if 'key_type' in params:
            query_params['keyType'] = params['key_type']
        if 'resolution' in params:
            query_params['resolution'] = params['resolution']
        if 'sub_key' in params:
            query_params['subKey'] = params['sub_key']

        header_params = {}
        if 'accept_language' in params:
            header_params['Accept-Language'] = params['accept_language']

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='SeriesImageQueryResults',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response

    def series_id_images_query_params_get(self, id, **kwargs):
        """

        Returns the allowed query keys for the `/series/{id}/images/query` route.
        Contains a parameter record for each unique `keyType`, listing values that will return results.

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please define a `callback` function
        to be invoked when receiving the response.
        >>> def callback_function(response):
        >>>     pprint(response)
        >>>
        >>> thread = api.series_id_images_query_params_get(id, callback=callback_function)

        :param callback function: The callback function
            for asynchronous request. (optional)
        :param int id: ID of the series (required)
        :param str accept_language: Records are returned with the Episode name and Overview in the desired language,
                                    if it exists. If there is no translation for the given language, then the record
                                    is still returned but with empty values for the translated fields.
        :return: SeriesImagesQueryParams
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'accept_language', 'callback']

        params = locals()
        for key, val in iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method series_id_images_query_params_get" % key
                )
            params[key] = val
        del params['kwargs']

        # verify the required parameter 'id' is set
        if ('id' not in params) or (params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `series_id_images_query_params_get`")

        resource_path = '/series/{id}/images/query/params'
        method = 'GET'

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']

        query_params = {}

        header_params = {}
        if 'accept_language' in params:
            header_params['Accept-Language'] = params['accept_language']

        form_params = {}
        files = {}

        body_params = None

        # HTTP header `Accept`
        header_params['Accept'] = self.api_client. \
            select_header_accept(['application/json'])
        if not header_params['Accept']:
            del header_params['Accept']

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client. \
            select_header_content_type(['application/json'])

        # Authentication setting
        auth_settings = ['jwtToken']

        response = self.api_client.call_api(resource_path, method,
                                            path_params,
                                            query_params,
                                            header_params,
                                            body=body_params,
                                            post_params=form_params,
                                            files=files,
                                            response_type='SeriesImagesQueryParams',
                                            auth_settings=auth_settings,
                                            callback=params.get('callback'))
        return response
